#include "Camera.h"

bool CameraObject::Init(D3DXVECTOR3 EyePos, D3DXVECTOR3 LookAt)
{
	this->EyePos = EyePos;
	this->LookAt = LookAt;
	UpVec = D3DXVECTOR3(0,1,0);

	if(!empty())
		return false;
	return true;
}

bool CameraObject::empty()
{
	bool empty = true;
	if(EyePos == LookAt && LookAt == UpVec)
		empty = false;
	return empty;
}

bool CameraObject::SetLookAt(D3DXVECTOR3 LookAt)
{
	D3DXVECTOR3 Old = this->LookAt;
	this->LookAt = LookAt;
	if(this->LookAt == Old)
		return false;
	return true;
}